import type { GreasyForkElements } from '../../../../../../../../../types/constants/personalization/greasy_fork'
import {
  PAGE_ELEMENTS,
  PROJECT_PREFIX,
  SUPPORTED_PLATFORMS,
} from '../../../../../../../../../types/constants'

// 测试链接：https://greasyfork.org/zh-CN/users/364215-ricsy/notifications
export class NotificationsPage {
  elements: GreasyForkElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.GREASY_FORK]
  private static instance: NotificationsPage

  /**
   * 获取单例实例
   */
  public static getInstance(): NotificationsPage {
    if (!NotificationsPage.instance) {
      NotificationsPage.instance = new NotificationsPage()
    }
    return NotificationsPage.instance
  }

  init(): void {
  }

  getMainStyles(): string {
    return `
.width-constraint {
  padding: 16px !important;

  .notification-list-header {
    margin-top: 0 !important;
    
    h2 {
      color: var(--${PROJECT_PREFIX}-theme-text-primary) !important;
      margin-top: 0 !important;
    }
  }
}
`
  }
}
